<?php

namespace App\Models;

use App\Traits\Trait12_14;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class FakeList extends Model
{
    use HasFactory;

    protected $table = 'fake_list';

    protected $fillable = [
        'message',
        'name',
        'userName',
        'email',
        'extra_data',  // 添加 extra_data 字段
        'status',
    ];

    protected $casts = [
        'extra_data' => 'array',  // 将 extra_data 转换为数组
    ];




    public function details()
    {
        return $this->hasMany(FakeDetail::class, 'f_id', 'id');
    }
}
